import { defineStore } from 'pinia';
import { QueryReplaceInfo, ReplaceOption } from '@type/replace';

interface Returns {
	replaceInfo: QueryReplaceInfo[];
	data: ReplaceOption | null;
}

export const useMode2Store = defineStore('mode2', {
	state(): Returns {
		return {
			replaceInfo: [],
			data: null,
		};
	},
	actions: {
		setReplaceInfo(arr: Returns['replaceInfo']) {
			this.replaceInfo = arr;
		},
		setData(s: Returns['data']) {
			this.data = s;
		},
	},
});
